#ifndef __GRILLE_HH__
#define __GRILLE_HH__

#include "coup.hh"
#include <iostream>

using namespace std;

#define GRILLE_WIDTH	8
#define GRILLE_HEIGHT	8

template<class T>
class Grille {
	friend ostream &operator << (ostream &os, const Grille<int> &gr);
	friend ostream &operator << (ostream &os, const Grille<int*> &gr);
	
	public :
		Grille () {};
		Grille (int, int, T);
		T& valeur (int, int);
		const T& valeur (int, int) const;
		bool valide (int, int) const;
		
		T& valeur (const Point&);
		const T& valeur (const Point&) const;
		bool valide (const Point&) const;
		
	private :
		T grille[GRILLE_WIDTH * GRILLE_HEIGHT];
		int width;
		int height;
};

#endif
